import QtQuick 2.0
import QtQuick.Controls 1.3
import QtQuick.Controls.Styles 1.3
Rectangle{
    property int thirdMenuItemWidth: 160
    property color thirdMenuBgColor: "#CC393E39"
//    property int thirdMenuItemHeight: 30
    property int thirdMenuItemHeight: 18
    property int thirdMenuContentLeftMargin: 30
    property string thirdMenuTextFont: "黑体"
    property int thirdMenuTextSize: 16
    property color thirdMenuTextColor: "#FFF"
    property color thirdMenuTextPressedColor: "#F00"
    property string thirdMenuText: ""
    property color normalColor: "#FFF"
    property color hoverColor: "#5be7c4"

    property string m_id: ""
     property var mouseclick:function(){
         app.slotGotoNPA(m_id)
     }

    property var hoverlick:function(){}
    property var nohoverlick:function(){}
    width: thirdMenuItemWidth
    height: thirdMenuItemHeight
    color: thirdMenuBgColor
    Text{
        id: menuTxt
         width: thirdMenuItemWidth
         height: thirdMenuItemHeight
         font.family: thirdMenuTextFont
         font.pixelSize: thirdMenuTextSize
         color: thirdMenuTextColor
         text: thirdMenuText
//         horizontalAlignment: Text.AlignHCenter
//         verticalAlignment: Text.AlignVCenter
         anchors.centerIn: parent
    }

    MouseArea{
        anchors.fill: parent
        hoverEnabled: true
        onEntered:{
            menuTxt.color = hoverColor
            hoverlick()
        }
        onExited: {
            menuTxt.color = normalColor
            nohoverlick()
        }
        onClicked: {
            mouseclick()
        }
    }
}
